<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/bigjo/js/jquery.js"></script>
<title>Insert title here</title>
</head>

<style type="text/css">
	#rein{
		position:relative;
		width: 20Em;
		height: 100px;
	}
</style>
<script type="text/javascript">
jQuery.noConflict();
jQuery("#errorinsert").click(function(){
	var idx = document.URL.indexOf("bigjo");
	var str = document.URL.substring(0,idx+5);
	var context = jQuery("#errortext").val();
	var sb_no = jQuery("#sb_no").val();
	alert(context);
	jQuery.ajax({
		url: str + "/sBoardReply.reply?context="+context+"&sb_no="+sb_no,
		error:function(data){
			alert("오류 발생");
		},
		success : function(data){
			alert("성공");
			jQuery("#replyInsert").prepend(data);
		}
	});
});

</script>

<body>
	<%String m_id = (String)session.getAttribute("member");%>
	<% String reply = "";
	if(m_id == null){ 
		reply = "disabled='disabled'";}else{ reply = ""; }
	%>
	<div id="rein">
		<input type="text" id="errortext" value="" <%=reply %> style="width: 270px"><input type="button" id="errorinsert" value="입력">
		<input type="hidden" id="sb_no" value="${sb_no}">
	</div>
	<div id="reply"></div>
</body>
</html>